<?php

declare(strict_types=1);

namespace App\Process;

use Hyperf\Process\AbstractProcess;
use Hyperf\Process\Annotation\Process;

/**
 * @Process(name="PullNaocsProcess")
 */
#[Process(name: 'PullNaocsProcess')]
class PullNacosProcess extends AbstractProcess
{

    protected $restartInterval = 5;

    public function handle(): void
    {
        file_put_contents(__DIR__ . '/../../.env', config('nacos_config'));
    }

    public function isEnable($server): bool
    {
        return false;
    }
}
